- content_for :meta do
  %meta{:name => "Description", :content => "Jetty Rae's song " + @song.name}
  %meta{:name => "Abstract", :content => "Jetty Rae's song " + @song.name}
  %meta{:name => "Keywords", :content => "music, jetty rae, " + @song.name}
- content_for :title do
  = "- " + @song.name
- content_for :page_description do
  %p
    Here you can download and read the lyrics from Jetty Rae's song
    = @song.name
%table.song
  %tr
    %td.song_header
      %h1.song
        - if @song.downloadable?
          =@song.name
          = render :partial => "player"
        - else
          =@song.name
      - if @song.album
        %h2.song_album
          - unless @song.track.nil?
            \#
            = @song.track.to_s + " on "
          %a{:href => album_url(@song.album), :title => @song.album.name}= @song.album.name
    - if @song.album && @song.album.artwork
      %td.alongside_image_for_song
        %a{:href => album_url(@song.album), :title => @song.album.name, :alt => @song.album.name}
          %img.small_album_artwork{:src => @song.album.artwork.public_filename(:thumb), :alt => @song.album.name, :title => @song.album.name}
  %tr
    %td{:colspan => "2"}
      %table.song_info
        - unless @song.lyrics.nil?
          %tr
            %td.field_title Lyrics:
            %td.field= simple_format(@song.lyrics)
        - unless @song.shows.empty?
          %tr
            %td.field_title Performed at:
            %td
              %ul
                - @song.shows.each do |show|
                  %li
                    %a{:href => show_url(show)}=show.location
                    on
                    =show.start_time.strftime("%B %o, %Y")
        - unless @song.videos.empty?
          %tr
            %td.field_title In these videos:
            %td.field
              - @song.videos.each do |video|
                %a{:href => video_url(video)}
                  %img.video_thumb{:src => video.thumbnail, :alt => video.caption, :title => video.caption}
        - if logged_in? && current_user.is_admin?
          %tr
            %td.field_title Edit:
            %td.field
              %a{:href => edit_song_url(@song), :title => "Edit \"#{@song.name}\"", :alt => "Edit \"#{@song.name}\""}="Edit \"#{@song.name}\""
%hr
- unless @song.comments.empty?
  %div.heading
    %img.heading{:src => "/images/headings/comments.jpg", :title => "Comments", :alt => "Comments"}
  %ol.comment_list
    - @song.comments.each do |comment|
      %li.comment
        - if logged_in? && current_user.is_admin?
          %div.delete_comment
            - form_for comment, comments_url, :html => {:method => :delete} do |form|
              = submit_tag "delete"
        %a.comment_user{:href => user_url(comment.user)}= comment.user.login
        says:
        %p.comment_date= comment.created_at.strftime("%B %o at %I:%M %p")
        %p.comment_text= comment.text
- if logged_in?
  %table.new_comment
    - form_for @comment do |form|
      %tr
        %td= error_messages_for :comment
      %tr
        %td
          %input{:value => @song.id, :name => "comment[song_id]", :type => "hidden"}
          = form.text_area :text, :class => "comment_entry"
      %tr  
        %td.submit= submit_tag 'add comment'
- else
  %p.new_comment
    = "Have something to say about \"" + @song.name + "?\""
    %a{:href => login_url, :title => "Login to jetty rae's website"}Login
    or
    %a{:href => signup_url, :title => "Sign up on jetty rae's website"}Signup